package com.itheima.Array;
import java.util.Scanner;
public class Array2 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int[] arr = new int[]{12,34,435,65,23,54,7};
        int index = -3;
        System.out.println("请输入你要查找的值:");
        int num = sc.nextInt();
        for (int i = 0; i < arr.length; i++) {
            if(num == arr[i]){
                index = i;
                break;
            }
        }
        System.out.println(index);
    }
}
